(() => {
  //布尔类型
  let flag: boolean = true;
  flag = false;
  console.log(flag);//false
  //flag = 1;//报错

  //数字
  let a1: number = 10 // 十进制
  let a2: number = 0b1010  // 二进制
  let a3: number = 0o12 // 八进制
  let a4: number = 0xa // 十六进制

  console.log(a1, a2, a3, a4);//10 10 10 10

  //字符串和数字之间能够一起拼接
  let str: string = "我考了";
  let num: number = 100;
  console.log(str + num);//我考了100

  let und: undefined = undefined;
  let nll: null = null;
  console.log(und, nll);//undefined null


  let arr1: number[] = [1, 2, 3, 4];
  let arr2: Array<number> = [5, 6, 7, 8];
  console.log(arr1, arr2)

  enum Color {
    Red,
    Green,
    Blue
  }
  let myColor: Color = Color.Red;
  console.log(myColor, Color.Green, Color.Blue);

  enum Color2 {
    Red = 1,
    Green = 3,
    Blue = 4
  }
  let c: Color2 = Color2.Red;
  console.log(c, Color2.Green, Color2.Blue);

  function fn(): void {
    console.log('fn()')
    // return undefined
    // return null
    //Freturn 1 // error
  }
  fn()
})()